<?php
/**
 * @author Tongle Xu <xutongle@gmail.com>
 * @copyright Copyright (c) 2003-2103 Jinan TintSoft development co., LTD
 * @license http://www.tintsoft.com/html/about/copyright/
 * @version $Id$
 */
$params = require (__DIR__ . '/params.php');
$config = [
	'id' => 'yuncms',
	'name'=>'YUNCMS内容管理系统',
	'basePath' => dirname ( __DIR__ ),
	// 'extensions' => require (__DIR__ .
	// '/../vendor/yiisoft/extensions.php'),

	'components' => [
		'request' => [
			'enableCsrfValidation' => true
		],
		'db'=>[
		        'class'=>'Leaps\Db\Connection',
		        'dsn' => 'mysql:host=localhost;dbname=yuncms',
		        'username' => 'root',
		        'password' => '123456',
		        'charset' => 'utf8',

		],
		'cache' => [
			'class' => 'Leaps\Caching\FileCache'
		],
		'user' => [
			'identityClass' => 'app\models\User'
		],
		// 'errorHandler' => [ 'errorAction' => 'site/error' ],
		'mail' => [
			'class' => 'Leaps\Swiftmailer\Mailer'
		],
		'log' => [
			'traceLevel' => LEAPS_DEBUG ? 3 : 0,
			'targets' => [
				[
					'class' => 'Leaps\Log\FileTarget',
					'levels' => [
						'trace',
						'error',
						'warning'
					]
				]
			]
		]
	],
	'params' => $params
];

// if (LEAPS_ENV_DEV) {
// $config ['preload'] [] = 'debug';
// $config ['modules'] ['debug'] = 'Leaps\Debug\Module';
// $config ['modules'] ['gii'] = 'Leaps\Gii\Module';
// }
$config ['modules'] ['admin'] = 'app\module\admin\Module';
return $config;